package com.agriculture.competition.service;

import com.agriculture.competition.domain.JaCompetitionInvitation;
import com.agriculture.competition.domain.JaCompetitionManage;
import com.agriculture.competition.domain.JaFile;
import com.agriculture.competition.domain.vo.*;
import com.agriculture.system.api.domain.SysUser;

import java.util.List;

/**
 * 比赛管理Service接口
 *
 * @author agriculture
 * @date 2024-11-12
 */
public interface IJaCompetitionManageService {

    /**
     * 查询比赛管理
     *
     * @param id 比赛管理主键
     * @return 比赛管理
     */
    public JaCompetitionManage selectJaCompetitionManageById(Long id);

    /**
     * 查询比赛管理列表
     *
     * @param jaCompetitionManage 比赛管理
     * @return 比赛管理集合
     */
    public List<JaCompetitionManageVo> selectJaCompetitionManageList(JaCompetitionManageVo jaCompetitionManage);

    /**
     * 新增比赛管理
     *
     * @param jaCompetitionManage 比赛管理
     * @return 结果
     */
    public int insertJaCompetitionManage(JaCompetitionManage jaCompetitionManage);

    /**
     * 修改比赛管理
     *
     * @param jaCompetitionManage 比赛管理
     * @return 结果
     */
    public int updateJaCompetitionManage(JaCompetitionManage jaCompetitionManage);

    /**
     * 批量删除比赛管理
     *
     * @param ids 需要删除的比赛管理主键集合
     * @return 结果
     */
    public int deleteJaCompetitionManageByIds(Long[] ids);

    /**
     * 删除比赛管理信息
     *
     * @param id 比赛管理主键
     * @return 结果
     */
    public int deleteJaCompetitionManageById(Long id);


    public List<JaFile> queryFiles(Long id, String flag);


    public List<JaCompetitionUserVo> queryScore(Long id);

    public List<CompetitionGroupVo> queryScoreResult(Long id);


    public List<CompetitionGroupVo> queryScoreFinal(Long id);

    public List<CompetitionGroupVo> queryScoreFinalResult(Long id);

    public List<JaCompetitionManageVo> queryCompetitionByStatus();

    public Integer queryCompetitionCount(Long id);

    public int participateInCompetition(CompetitionGroupVo vo);


    public List<JaCompetitionManageVo> selfCompetition(JaCompetitionManageVo jaCompetitionManage);


    public boolean submitSolution(JaCompetitionSolutionVo jaCompetitionSolutionVo);


    public boolean saveScore(JaCompetitionScoreVo competitionGroupVo);

    public boolean saveScoreResult(JaCompetitionScoreVo jaCompetitionScoreVo);


    public boolean saveCompetitionFile(List<JaFile> jaFile);

    public boolean  deleteFile(Long id);
    public boolean  deleteModelFile(Long id);
    /**
     * 新增修改比赛时获取老师列表
     *
     * @return
     */
    List<SysUser> queryTeacherList();


    List<SysUser> queryAllList(String userName);


    List<JaCompetitionInvitation> queryGroupUser(Long id);

    boolean checkIsCompetition(Long id);

    List<CompetitionGroupVo> queryLoginUserGroup();

}
